﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>地址测试</title>
    <link href="/quanliadmin/docroot/images/comm/favicon.ico?v=20140830" rel="shortcut icon">
    <link rel="stylesheet" href="/quanliadmin/docroot/css/bootstrap.min.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="/quanliadmin/docroot/css/styles.css?v=20140815" type="text/css" media="screen" />
    <link rel="stylesheet" href="/framework/flexigrid/css/flexigrid.pack.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="/framework/ebsig/css/ebsig.min.css?v=20140109" type="text/css" media="screen" />
    <link rel="stylesheet" type="text/css" href="/framework/jquery/jquery-ui.css" />
    <script language="JavaScript" src="/framework/jquery/jquery.min.js?v=20140719" type="text/javascript"></script>
    <script src="/framework/jquery/jquery-ui.min.js"></script>
    <script language="JavaScript" src="/framework/flexigrid/js/flexigrid.js" type="text/javascript"></script>
    <script language="JavaScript" src="/framework/ebsig/js/ebsig.min.js?v=20141128" type="text/javascript"></script>
</head>
<body>

<div class="container">

    <div class="comm_right">
        <div class="comm_content">

            <div class="search-box">
                <div style="position:relative">
                    <form id="search_form" class="form-inline" onsubmit="return false;">
                        <table>
                            <tbody>
                            <tr>
                                <td>输入地址：<input type="text" id="address" value="" class="form-control input-sm w300"  name="address" /></td>
                            </tr>
                            <tr>
                                <td>配送区域：<input type="text" id="result" class="form-control input-sm w150"  name="result" /></td>
                            </tr>
                            <tr>
                                <td>配送区域ID：<input type="text" id="result3" class="form-control input-sm w150"  name="result3" /></td>
                            </tr>
                            <tr>
                                <td>实际运费：<input type="text" id="result1" class="form-control input-sm w150"  name="result1" /></td>
                            </tr>
                            <tr>
                                <td>理论运费：<input type="text" id="result2" class="form-control input-sm w150"  name="result2" /></td>
                            </tr>
                            <tr>
                                <td>站点ID：<input type="text" id="result4" class="form-control input-sm w150"  name="result4" /></td>
                            </tr>
                            <tr>
                                <td>站点名称：<input type="text" id="result5" class="form-control input-sm w150"  name="result5" /></td>
                            </tr>
                            <td colspan="4">
                                &nbsp;
                                <input type="button" value="查询" class="btn btn-primary" onclick="demo.search();" />
                            </td>
                            </tbody>
                        </table>
                    </form>
                </div>
            </div>

        </div>

    </div>

</div>


<script type="text/javascript">

    var demo = {

        search:function(){

            E.ajax_get({
                url: '/invokingAjax-shop/default/deliver.ajax?operFlg=6',
                data: {
                    provinceid:10,
                    cityid: 110,
                    countyid:443,
                    address:$("#address").val()
                },
                call: function( o ) {
                    E.loadding.close();
                    if ( o.code == 200 ) {
                        E.popup.close();

                        address:$("#result").val(o.data.send_region_name);
                        address:$("#result3").val(o.data.areaID);
                        address:$("#result1").val(o.data.freight);
                        address:$("#result2").val(o.data.overweight_freight);
                        address:$("#result4").val(o.data.distribution_id);
                        address:$("#result5").val(o.data.distribution_name);

                    } else {
                        E.alert(o.message);
                    }
                }
            });

        }
    };

</script>

</body>
</html>